compose: Show mute icon on channel detail title and align title spacing#6513
Conversation
Add a trailing mute icon next to the name on the Group Info and Contact Info screens when the chat is muted, matching the design system. Tighten the gap between the title and the status line from 8dp to 4dp. Extract a shared ChannelInfoTitle composable used by both screens. The muted state is derived from the channel info options: MuteChannel for a group, MuteChannel or MuteUser for a direct message. The icon uses the drawable's intrinsic size so a drawable override resizes it.
Expose ChannelInfoViewState.Content.isMuted as a property derived from the mute options (channel muted for a group, channel or other user muted for a direct message). The Group Info and Contact Info screens read this instead of scanning the options in composition, keeping the rule in one place on the view state.
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
|
@CodeRabbit review |
✅ Action performedReview finished.
|
WalkthroughAdds an ChangesMute state in channel info screens
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@stream-chat-android-ui-common/src/test/kotlin/io/getstream/chat/android/ui/common/state/channel/info/ChannelInfoViewStateTest.kt`:
- Around line 28-30: The parameterized test display-name placeholder in the
isMutedArguments method source is incorrect. The display name pattern "isMuted
is {1} when {0}" references a second argument with {1}, but the isMutedArguments
source method only provides a single argument (testData: IsMutedTestData) via
Arguments.of(testData). Fix this by updating the display name pattern in the
`@ParameterizedTest` annotation to use only {0}, which will resolve to the string
representation of the IsMutedTestData object (the description).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 8aac450d-5f8d-49ca-a061-01a1b61d784f
⛔ Files ignored due to path filters (10)
stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_DirectChannelInfoContentTest_channel_muted_content.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_DirectChannelInfoContentTest_channel_muted_content_in_dark_mode.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_DirectChannelInfoContentTest_content.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_DirectChannelInfoContentTest_content_in_dark_mode.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_DirectChannelInfoContentTest_user_muted_content.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_DirectChannelInfoContentTest_user_muted_content_in_dark_mode.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_GroupChannelInfoContentTest_collapsed_members.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_GroupChannelInfoContentTest_collapsed_members_in_dark_mode.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_GroupChannelInfoContentTest_expanded_members.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_GroupChannelInfoContentTest_expanded_members_in_dark_mode.pngis excluded by!**/*.png
📒 Files selected for processing (10)
stream-chat-android-compose/api/stream-chat-android-compose.apistream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/ChannelInfoScreenDefaults.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/DirectChannelInfoScreen.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/GroupChannelInfoScreen.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactoryParams.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/channel/info/DirectChannelInfoContentTest.ktstream-chat-android-ui-common/api/stream-chat-android-ui-common.apistream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/state/channel/info/ChannelInfoViewState.ktstream-chat-android-ui-common/src/test/kotlin/io/getstream/chat/android/ui/common/state/channel/info/ChannelInfoViewStateTest.kt
The test name referenced {1}, but each case passes a single argument, so
the placeholder rendered literally. Fold the expected value into the test
data toString and use {0} for a readable name.
|


Goal
Align the Channel Detail title area with the new design on both the Group Info and Contact Info screens. When the chat is muted, the design shows a mute icon right after the name, and the gap between the name and the status line below it is smaller than what we ship today.
Linear: AND-1255
Implementation
ChannelInfoTitlecomposable used by both the Group Info and Contact Info screens. It renders the name and, when the chat is muted, a trailing mute icon.stream_design_ic_mutedrawable at its intrinsic size (20dp, matching the design) and the primary text color. The size is not hard coded, so a drawable override resizes it.ChannelInfoViewState.Content.isMuted: the channel is muted for a group, or the channel or the other user is muted for a direct message. Both screens read this single value instead of computing it in the UI.ChannelInfoViewStateTestcovering theisMutedderivation, and added Paparazzi snapshots for the muted state on both screens.🎨 UI Changes
Group Info
Contact Info
Testing
Group Info
Contact Info
On both screens, check that the spacing between the title and the status line below it (for example "Online" or "9 members · 1 online") matches the design.
Summary by CodeRabbit
New Features
Tests